#ifndef TOOLCREATELINE_H
#define TOOLCREATELINE_H

#include <ToolCreate>

class QLineEdit;
class QPushButton;

class Line;
class QMouseEvent;

class ToolCreateLine : public ToolCreate
{
    Q_OBJECT
public:
    explicit ToolCreateLine(QObject *parent = 0);
    
    QString name() const;
    QString categoryName() const;
    QString iconPath() const;

    void enter();
    void exit();

    void onMousePress(QMouseEvent* pEvent);
    void onMouseMove(QMouseEvent* pEvent);
    void onMouseRelease(QMouseEvent* pEvent);

    void draw();

    void initPropertiesWidget();
private:
    QPointer<Line> m_currentLine;

    QPointer<QLineEdit> m_startX;
    QPointer<QLineEdit> m_startY;
    QPointer<QLineEdit> m_endX;
    QPointer<QLineEdit> m_endY;
    QPointer<QPushButton> m_buttonCreate;
signals:

public slots:
private slots:
    void onCreateLineParametric();
    void onTextChanged(const QString& text);
    
};

#endif // TOOLCREATELINE_H
